﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using ThresholdAssistant.Enums;

namespace ThresholdAssistant.DataContract.Models
{
    /// <summary>
    /// 机器人指令推送内容
    /// </summary>
    [BsonIgnoreExtraElements, Table("PublishCmdBody")]
    public class PublishCmdBody: IMEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [BsonId]
        [BsonRepresentation(BsonType.ObjectId)]
        public string Id { get; set; }

        /// <summary>
        /// 命令编码
        /// </summary>
        public int Cmd { get; set; }

        /// <summary>
        /// 业务流水号
        /// </summary>
        public string SerialNo { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        public string DeviceNo { get; set; }

        /// <summary>
        /// 机器人Id
        /// </summary>
        public string RobotId { get; set; }

        /// <summary>
        /// 程序编号
        /// </summary>
        public string UserSerialNo { get; set; }

        /// <summary>
        /// 指令获取方式
        /// </summary>
        public CmdTypeEnum Type { get; set; }

        /// <summary>
        /// 时间戳(13位,毫秒)
        /// </summary>
        public long TimeStamp { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 指令Json参数
        /// </summary>
        public string Data { get; set; }
    }
}